﻿using Microsoft.Extensions.DependencyInjection;
using System;
using Volo.Abp.AspNetCore.SignalR;

namespace Xms.Abp.AspNetCore.SignalR;

public abstract class XmsHub : AbpHub
{
    protected TService LazyInject<TService>()
    {
        return LazyServiceProvider.LazyGetRequiredService<TService>();
    }

    [Obsolete("Use LazyInject method.")]
    protected TService Inject<TService>()
    {
        return ServiceProvider.GetRequiredService<TService>();
    }
}
